using System;
using System.Collections.Generic;
using System.Text;

namespace Mud.Server
{
	/// <summary>
	/// Holds the current server state. This object is updated by the server.
	/// </summary>
	public class ServerState
	{
		/// <summary>
		/// How much did the last server loop took to process in milliseconds.
		/// </summary>
		public int LastTickDuration {
			get { return _lastTickDuration; }
			set { _lastTickDuration = value; }
		}
		private int _lastTickDuration;

		/// <summary>
		/// Current server lag.
		/// </summary>
		public float ServerLag {
			get { return _serverLag; }
			set { _serverLag = value; }
		}
		private float _serverLag;

		/// <summary>
		/// Number of clients currently connected to the server (including remote clients).
		/// </summary>
		public int ClientCount {
			get { return _clientCount; }
			set { _clientCount = value; }
		}
		private int _clientCount;

		/// <summary>
		/// Number of remote clients currently connected to the server.
		/// </summary>
		public int RemoteClientCount {
			get { return _remoteClientCount; }
			set { _remoteClientCount = value; }
		}
		private int _remoteClientCount;

		/// <summary>
		/// How many command messages from clients where processed last cycle
		/// </summary>
		public int CommandMessagesProcessedLastTick {
			get { return _commandsMessagesProcessedLastTick; }
			set { _commandsMessagesProcessedLastTick = value; }
		}
		private int _commandsMessagesProcessedLastTick;

		/// <summary>
		/// Total amount of command messages processed since server started.
		/// </summary>
		public int CommandMessagesProcessedTotal {
			get { return _commandMessagesProcessedTotal; }
			set { _commandMessagesProcessedTotal = value; }
		}
		private int _commandMessagesProcessedTotal;

		/// <summary>
		/// How many event messages was sent to clients in the last cycle
		/// </summary>
		public int EventMessagesProcessedLastTick {
			get { return _eventMessagesProcessedLastTick; }
			set { _eventMessagesProcessedLastTick = value; }
		}
		private int _eventMessagesProcessedLastTick;

		/// <summary>
		/// Total amount of event messages sent to clients since server started.
		/// </summary>
		public int EventMessagesProcessedTotal {
			get { return _eventMessagesProcessedTotal; }
			set { _eventMessagesProcessedTotal = value; }
		}
		private int _eventMessagesProcessedTotal;

		/// <summary>
		/// Date and time when the server started.
		/// </summary>
		public DateTime ServerStarted {
			get { return _serverStarted; }
			set { _serverStarted = value; }
		}
		private DateTime _serverStarted;


	}
}
